package dao;

import util.DBHelp;
import entity.UserProject;

public class UserProjectDao {
	private DBHelp<UserProject> db=new DBHelp<UserProject>();
	
	public void save(UserProject up){
		String sql="insert into t_user_project(role,project_id,user_id) values(?,?,?)";
		db.executeSQL(sql,up.getRole(),up.getProject_id(),up.getUser_id());
	}
	
	public void update(UserProject up){
		String sql="update t_user_project set role=?,user_id=? where project_id=?";
		db.executeSQL(sql, up.getRole(),up.getUser_id(),up.getProject_id());
	}
}
